/ Software of the Month Club 1999 November
/ SOTMC_Nov1999-Ultimate.iso / mac / REALbasic ƒ / Examples / Techniques / Examples by Thomas Tempelmann / FAQs from RB-NUG mailing list / Why GOTO? ![]() | < prev |
MacBinary | 1999-07-06 | 1.6 KB | [clpt/drag] |
Confidence | Program | Detection | Match Type | Support |
---|---|---|---|---|
100% | dexvert | MacOS Resource Fork (archive/rsrc) | magic | Supported |
1% | dexvert | MacBinary (archive/macBinary) | fallback | Supported |
100% | file | MacBinary II, inited, Sun Mar 14 04:14:44 1999, modified Tue Jul 6 15:28:58 1999, creator 'drag', type 'clpt' "Why GOTO?", at 0x80 1453 bytes resource Targa image data - Map 65536 x 28160 x 24 +16132 - 9-bit alpha | default (weak) | |
99% | file | Apple HFS/HFS+ resource fork, map offset 0x53f, map length 0x6e, data length 0x43f, at 16 0x1809ff0a, nextResourceMap 0x975f700, fileRef 0x3426, list offset 0x1c, name offset 0x6e, 4 types, 0x54455854 'TEXT' * 1 resource offset 0x22 | default | |
98% | file | data | default | |
74% | TrID | Mac Text clippings (MacBinary) | default | |
25% | TrID | MacBinary 2 | default (weak) | |
100% | dearkID | deark: macbinary | default | |
100% | lsar | MacBinary | default |
id metadata | |
---|---|
key | value |
macFileType | [clpt] |
macFileCreator | [drag] |
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 09 57 68 79 20 47 4f | 54 4f 3f 00 00 00 00 00 |..Why GO|TO?.....|
|00000010| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 63 6c 70 74 64 72 61 | 67 01 00 00 00 00 00 00 |.clptdra|g.......|
|00000050| 00 00 00 00 00 00 00 00 | 00 05 ad b3 11 2e 84 b3 |........|........|
|00000060| a8 09 7a 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |..z.....|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 a6 dc 00 00 |........|........|
|00000080| 00 00 01 00 00 00 05 3f | 00 00 04 3f 00 00 00 6e |.......?|...?...n|
|00000090| 18 09 ff 0a 00 00 60 00 | 00 01 80 00 00 13 00 00 |......`.|........|
|000000a0| 70 37 5e a1 04 54 65 6d | 70 30 6f 74 64 20 32 00 |p7^..Tem|p0otd 2.|
|000000b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000000c0| 00 00 00 00 00 00 00 03 | b6 37 00 0f c0 00 00 0f |........|.7......|
|000000d0| c0 00 00 0c 00 00 01 e6 | 00 00 00 3e 00 00 03 53 |........|...>...S|
|000000e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000000f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000100| 00 00 00 0f c0 00 00 00 | 00 2a 00 00 00 00 00 00 |........|.*......|
|00000110| 00 00 00 2f 40 00 00 2a | 00 7e 00 00 00 00 00 00 |.../@..*|.~......|
|00000120| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000130| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000140| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000150| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000160| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000170| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000180| 00 00 03 c5 53 bf 72 65 | 6e 20 4f 6c 69 6e 20 77 |....S.re|n Olin w|
|00000190| 72 6f 74 65 3a 0d 0d 3e | 77 6f 75 6c 64 20 64 6f |rote:..>|would do|
|000001a0| 20 69 74 20 66 6f 72 20 | 74 68 69 73 20 65 78 61 | it for |this exa|
|000001b0| 6d 70 6c 65 2c 20 69 20 | 68 61 76 65 20 6e 6f 74 |mple, i |have not|
|000001c0| 20 79 65 74 20 66 6f 75 | 6e 64 20 6f 6e 65 20 73 | yet fou|nd one s|
|000001d0| 69 74 75 61 74 69 6f 6e | 20 77 68 65 72 65 20 69 |ituation| where i|
|000001e0| 20 0d 3e 68 61 76 65 20 | 61 63 74 75 61 6c 6c 79 | .>have |actually|
|000001f0| 20 6e 65 65 64 65 64 20 | 74 68 65 20 67 6f 74 6f | needed |the goto|
|00000200| 2e 0d 0d 54 68 65 72 65 | 27 73 20 61 20 66 65 77 |...There|'s a few|
|00000210| 20 73 69 74 75 61 74 69 | 6f 6e 73 20 77 68 65 72 | situati|ons wher|
|00000220| 65 20 61 20 47 4f 54 4f | 20 69 73 20 72 65 61 6c |e a GOTO| is real|
|00000230| 6c 79 20 68 65 6c 70 66 | 75 6c 20 61 6e 64 20 6d |ly helpf|ul and m|
|00000240| 61 6b 65 73 0d 74 68 65 | 20 63 6f 64 65 20 65 61 |akes.the| code ea|
|00000250| 73 69 65 72 20 74 6f 20 | 75 6e 64 65 72 73 74 61 |sier to |understa|
|00000260| 6e 64 20 61 6e 64 20 6d | 61 69 6e 74 61 69 6e 2e |nd and m|aintain.|
|00000270| 0d 0d 4f 6e 65 20 49 20 | 73 6f 6d 65 74 69 6d 65 |..One I |sometime|
|00000280| 73 20 65 6e 63 6f 75 6e | 74 65 72 20 69 73 20 74 |s encoun|ter is t|
|00000290| 68 65 20 63 61 73 65 20 | 77 68 65 6e 20 49 20 68 |he case |when I h|
|000002a0| 61 76 65 20 74 6f 0d 63 | 6f 6d 62 69 6e 65 20 73 |ave to.c|ombine s|
|000002b0| 65 76 65 72 61 6c 20 63 | 6f 6d 62 69 6e 65 64 20 |everal c|ombined |
|000002c0| 49 46 20 73 74 61 74 65 | 6d 65 6e 74 73 20 6c 69 |IF state|ments li|
|000002d0| 6b 65 20 74 68 69 73 3a | 0d 0d 20 20 49 46 20 63 |ke this:|.. IF c|
|000002e0| 61 73 65 41 20 54 48 45 | 4e 0d 20 20 20 20 49 46 |aseA THE|N. IF|
|000002f0| 20 63 61 73 65 42 20 54 | 48 45 4e 0d 20 20 20 20 | caseB T|HEN. |
|00000300| 20 20 2f 2f 20 64 6f 20 | 69 74 0d 20 20 20 20 45 | // do |it. E|
|00000310| 4c 53 45 0d 20 20 20 20 | 20 20 2f 2f 20 64 6f 6e |LSE. | // don|
|00000320| 27 74 20 64 6f 20 69 74 | 0d 20 20 20 20 45 4e 44 |'t do it|. END|
|00000330| 0d 20 20 45 4c 53 45 0d | 20 20 20 20 2f 2f 20 64 |. ELSE.| // d|
|00000340| 6f 20 69 74 0d 20 20 45 | 4e 44 0d 0d 57 65 20 77 |o it. E|ND..We w|
|00000350| 6f 75 6c 64 20 68 61 76 | 65 20 74 77 6f 20 63 61 |ould hav|e two ca|
|00000360| 73 65 73 20 77 68 65 72 | 65 20 77 65 27 64 20 64 |ses wher|e we'd d|
|00000370| 6f 20 74 68 65 20 73 6f | 6d 65 20 74 68 69 6e 67 |o the so|me thing|
|00000380| 2c 0d 61 6e 64 20 77 65 | 20 77 61 6e 74 20 74 6f |,.and we| want to|
|00000390| 20 61 76 6f 69 64 20 64 | 6f 75 62 6c 69 6e 67 20 | avoid d|oubling |
|000003a0| 74 68 65 20 63 6f 64 65 | 20 66 6f 72 20 69 74 20 |the code| for it |
|000003b0| 28 74 68 61 74 27 73 0d | 66 6f 72 20 74 68 65 20 |(that's.|for the |
|000003c0| 67 6f 61 6c 20 6f 66 20 | 65 61 73 69 65 72 20 6d |goal of |easier m|
|000003d0| 61 69 6e 74 65 6e 61 6e | 63 65 29 2e 0d 0d 45 69 |aintenan|ce)...Ei|
|000003e0| 74 68 65 72 20 77 65 20 | 72 65 73 68 75 66 66 6c |ther we |reshuffl|
|000003f0| 65 20 74 68 65 20 63 61 | 73 65 73 20 28 77 68 69 |e the ca|ses (whi|
|00000400| 63 68 20 63 61 6e 20 67 | 65 74 20 63 6f 6d 70 6c |ch can g|et compl|
|00000410| 69 63 61 74 65 64 0d 77 | 69 74 68 20 6d 6f 72 65 |icated.w|ith more|
|00000420| 20 63 6f 6d 70 6c 65 78 | 20 63 6f 6e 64 69 74 69 | complex| conditi|
|00000430| 6f 6e 73 29 2c 20 6f 72 | 20 77 65 20 61 64 64 20 |ons), or| we add |
|00000440| 73 6f 6d 65 20 6d 6f 72 | 65 0d 74 65 72 6d 73 20 |some mor|e.terms |
|00000450| 74 6f 20 74 68 65 20 49 | 46 20 63 6c 61 75 73 65 |to the I|F clause|
|00000460| 73 20 28 61 6c 73 6f 20 | 61 64 64 73 20 63 6f 6d |s (also |adds com|
|00000470| 70 6c 65 78 69 74 79 20 | 61 6e 64 20 64 6f 75 62 |plexity |and doub|
|00000480| 6c 65 64 0d 63 6f 64 65 | 29 2c 20 6f 72 20 77 65 |led.code|), or we|
|00000490| 20 75 73 65 20 47 4f 54 | 4f 2c 20 77 68 69 63 68 | use GOT|O, which|
|000004a0| 20 6b 65 65 70 73 20 69 | 74 20 73 69 6d 70 6c 65 | keeps i|t simple|
|000004b0| 20 74 68 65 20 77 61 79 | 20 77 65 0d 68 61 64 20 | the way| we.had |
|000004c0| 69 74 3a 0d 0d 20 20 49 | 46 20 63 61 73 65 41 20 |it:.. I|F caseA |
|000004d0| 54 48 45 4e 0d 20 20 20 | 20 49 46 20 63 61 73 65 |THEN. | IF case|
|000004e0| 42 20 54 48 45 4e 0d 20 | 20 20 20 20 20 47 4f 54 |B THEN. | GOT|
|000004f0| 4f 20 64 6f 49 74 0d 20 | 20 20 20 45 4c 53 45 0d |O doIt. | ELSE.|
|00000500| 20 20 20 20 20 20 2f 2f | 20 64 6f 6e 27 74 20 64 | //| don't d|
|00000510| 6f 20 69 74 0d 20 20 20 | 20 45 4e 44 0d 20 20 45 |o it. | END. E|
|00000520| 4c 53 45 0d 20 20 20 20 | 64 6f 49 74 3a 0d 20 20 |LSE. |doIt:. |
|00000530| 20 20 2f 2f 20 64 6f 20 | 69 74 0d 20 20 45 4e 44 | // do |it. END|
|00000540| 0d 0d 54 68 6f 6d 61 73 | 0d 00 00 00 16 00 01 00 |..Thomas|........|
|00000550| 00 00 00 00 0b 00 09 00 | 04 00 00 00 09 00 00 00 |........|........|
|00000560| 00 00 00 00 00 00 30 00 | 00 00 01 00 00 00 04 00 |......0.|........|
|00000570| 00 00 00 00 00 00 02 54 | 45 58 54 00 00 01 00 00 |.......T|EXT.....|
|00000580| 00 00 00 00 00 00 00 73 | 74 79 6c 00 00 01 00 00 |.......s|tyl.....|
|00000590| 00 00 00 00 00 00 00 00 | 00 00 24 00 00 00 05 00 |........|..$.....|
|000005a0| 01 04 07 00 40 00 20 02 | 48 02 30 00 00 00 00 00 |....@. .|H.0.....|
|000005b0| 00 01 70 8c 00 00 00 09 | 99 91 e0 00 00 00 00 00 |..p.....|........|
|000005c0| 00 01 00 00 00 05 3f 00 | 00 04 3f 00 00 00 6e 09 |......?.|..?...n.|
|000005d0| 75 f7 00 34 26 00 00 00 | 1c 00 6e 00 03 54 45 58 |u..4&...|..n..TEX|
|000005e0| 54 00 00 00 22 73 74 79 | 6c 00 00 00 2e 64 72 61 |T..."sty|l....dra|
|000005f0| 67 00 00 00 3a 6b 77 73 | 74 00 00 00 46 01 00 ff |g...:kws|t...F...|
|00000600| ff 00 00 00 00 00 00 00 | 00 01 00 ff ff 00 00 03 |........|........|
|00000610| c9 00 00 00 00 00 80 ff | ff 00 00 03 e3 00 00 00 |........|........|
|00000620| 00 bf 4c ff ff 00 00 04 | 17 00 e2 6b 30 00 00 00 |..L.....|...k0...|
|00000630| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000640| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000650| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000660| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000670| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
+--------+-------------------------+-------------------------+--------+--------+